//
//  SingleImageCollectionCell.m
//  QuXiang
//
//  Created by Duncan on 2020/6/18.
//  Copyright © 2020 NanHuaiZi. All rights reserved.
//

#import "SingleImageCollectionCell.h"

@implementation SingleImageCollectionCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:self.backImageView];
        [self masonryLayout];
    }
    return self;
}

#pragma mark ------- Lazy Methods -------

- (void)masonryLayout {
    [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView);
    }];
}

- (UIImageView *)backImageView {
    if (!_backImageView) {
        _backImageView = [[UIImageView alloc] init];
        _backImageView.contentMode = UIViewContentModeScaleToFill;
    }
    return _backImageView;
}

@end
